package spotGUI.mainFrameGUI;

import java.awt.Toolkit;

import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JProgressBar;
import java.util.ResourceBundle;

public class LoadingDialog extends JDialog {
	
	private JProgressBar progressBar;
	private JLabel lblCaricamentoInCorso;
	
	public LoadingDialog(JDialog parent) {
		
		super(parent);
		setResizable(false);
		setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
		setTitle(ResourceBundle.getBundle("spotGUI.mainFrameGUI.messages").getString("LoadingDialog.this.title")); //$NON-NLS-1$ //$NON-NLS-2$
		setBounds(((int)Toolkit.getDefaultToolkit().getScreenSize().getWidth()-390)/2, ((int)Toolkit.getDefaultToolkit().getScreenSize().getHeight()-132)/2, 390, 132);
		getContentPane().setLayout(null);
		
		progressBar = new JProgressBar();
		progressBar.setBounds(125, 65, 247, 25);
		getContentPane().add(progressBar);
		
		lblCaricamentoInCorso = new JLabel("");
		lblCaricamentoInCorso.setBounds(125, 34, 163, 25);
		lblCaricamentoInCorso.setName("Spot Messenger");
		getContentPane().add(lblCaricamentoInCorso);
	}

	public JProgressBar getProgressBar() {
		return progressBar;
	}
	public JLabel getLabel() {
		return lblCaricamentoInCorso;
	}
}
